Lock-Free Algorithms for Thread Safe Programming

نویسنده

  • Patrick Garrity
چکیده

An object is lock-free if it guarantees that in a system where multiple threads are manipulating the object, some thread will complete its operation on the object in a finite number of steps, no matter what happens to other threads. More practically, lock-free programming is a technique to achieve thread safety without the use of locks, which are the current standard. Lock-free objects (LFOs) have a number of useful properties that make them more broadly useful than locked objects, and also tend to perform well under high contention (being accessed by many threads at once). Though lock-free objects are not very common in practice, there is an opportunity for this to change. Lock-free algorithms (LFAs) are notoriously difficult to design and prove correct, and implementing them presents a number of technical challenges, but over the course of around ten years several commonly used data structures have been developed. This paper approaches lock-free objects from a practical standpoint. It addresses their features and problems, along with specific implementation issues. This paper also summarizes a large set of useful lock-free algorithms that would be broadly useful. Finally, it reports on the author’s efforts to implement a collection of lock-free data structures (LFDS) for general use.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

On lock-free programming patterns

Lock-free programming is a well-known technique for multithreaded programming. Lock-free programming is a way to share changing data among several threads without paying the cost of acquiring and releasing locks. On practice, parallel programming models must include scalable concurrent algorithms and patterns. Lock-free programming patterns play an important role in scalability. This paper is d...

متن کامل

Strategized Locking, Thread-safe Interface, and Scoped Locking Patterns and Idioms for Simplifying Multi-threaded C++ Components

Developing multi-threaded applications is hard since incorrect use of locks can cause subtle and pernicious errors. Likewise, developing multi-threaded reusable components is hard since it can be time-consuming to customize components to support new, more efficient locking strategies. This paper describes a pair of patterns, Strategized Locking and Thread-safe Interface, and a C++ idiom, Scoped...

متن کامل

Efficient MPI Support for Advanced Hybrid Programming Models

The number of multithreaded Message Passing Interface (MPI) implementations and applications is increasing rapidly. We discuss how multithreaded applications can receive messages of unknown size. As is well known, combining MPI Probe/MPI Recv is not threadsafe, but many assume that trivial workarounds exist. We discuss those workarounds and show how they fail in practice by either limiting the ...

متن کامل

Toward Efficient Support for Multithreaded MPI Communication

To make the most effective use of parallel machines that are being built out of increasingly large multicore chips, researchers are exploring the use of programming models comprising a mixture of MPI and threads. Such hybrid models require efficient support from an MPI implementation for MPI messages sent from multiple threads simultaneously. In this paper, we explore the issues involved in des...

متن کامل

Parallel Combining: Making Use of Free Cycles

There are two intertwined factors that affect performance of concurrent data structures: the ability of processes to access the shared data in parallel and the cost of synchronization. It has been observed that for a class of “concurrencyaverse” data structures, the use of fine-grained locking for parallelization does not pay off: an implementation based on a single global lock outperforms fine...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2011